home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / String.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  3KB  |  137 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // String.h
  5. //
  6. // API for the package String.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/String.h 8     2/11/00 16:13 Tim $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(String);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "string" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. //
  28. // string Join( string left, string right )
  29. //
  30. // Concatenate two strings and return the result.
  31. //
  32. prototype string String.Join( string left, string right );
  33.  
  34. //
  35. // string FromInt( int value )
  36. //
  37. // Returns a string containing the integer.
  38. //
  39. prototype string String.FromInt( int value );
  40.  
  41. //
  42. // string FromFloat( float value )
  43. //
  44. // Returns a string containing the floating point value.
  45. //
  46. prototype string String.FromFloat( float value );
  47.  
  48. //
  49. // int ToInt( string str_int )
  50. //
  51. // Returns the integer taken from the given string.
  52. //
  53. prototype int String.ToInt( string str_int );
  54.  
  55. //
  56. // float ToFloat( string str_float )
  57. //
  58. // Returns the floating point value taken from the given string.
  59. //
  60. prototype float String.ToFloat( string str_float );
  61.  
  62. //
  63. // string UpperCase( string str_in )
  64. //
  65. // Returns the upper case version of the given string
  66. //
  67. prototype string String.UpperCase( string str_int );
  68.  
  69. //
  70. // string Left( string str_in, int n )
  71. //
  72. // Returns the left n characters of str_in,
  73. // or the entire string if n is greater than the string's length
  74. //
  75. prototype string String.Left( string str_in, int n );
  76.  
  77.  
  78. //
  79. // string Right( string str_in, int n )
  80. //
  81. // Returns the right n characters of str_in,
  82. // or the entire string if n is greater than the string's length
  83. //
  84. prototype string String.Right( string str_in, int n );
  85.  
  86.  
  87. //
  88. // string Mid( string str_in, int start, int n )
  89. //
  90. // Returns the middle n characters of str_in, starting at index first
  91. //
  92. prototype string String.Mid( string str_in, int first, int n );
  93.  
  94.  
  95. //
  96. // string TrimLeft( string str_in, int n )
  97. //
  98. // Return a string excluding the leftmost n characters
  99. // of str_in.
  100. //
  101. prototype string String.TrimLeft( string str_in, int n );
  102.  
  103.  
  104. //
  105. // string TrimRight( string str_in, int n )
  106. //
  107. // Return a string excluding the rightmost n characters
  108. // of str_in.
  109. //
  110. prototype string String.TrimRight( string str_in, int n );
  111.  
  112.  
  113. //
  114. // string FormatStrStr( string format_str, string param_1, string_param2 )
  115. //
  116. // Return a string formatted in the fprintf style :
  117. // i.e. format_str contains text and exactly two %s format specifiers.
  118. //
  119. prototype string String.FormatStrStr( string format_str, string param_1, string param_2 );
  120.  
  121. //
  122. // string FormatInt( string format_str, int param_1 )
  123. //
  124. // Return a string formatted in the fprintf style :
  125. // i.e. format_str contains text and exactly one %d or %u format specifier.
  126. //
  127. prototype string String.FormatInt( string format_str, int param_1 );
  128.  
  129. //
  130. // int Length( string in )
  131. //
  132. // Get the length
  133. //
  134. prototype int String.Length( string in );
  135.  
  136. #endif // FLUX_LIB
  137.